package com.ruoyi.repairSign.service.impl;

import com.ruoyi.project.domain.HouseProjectT;
import com.ruoyi.project.domain.HouseRepairCheckT;
import com.ruoyi.repairSign.domain.HouseRepairSignT;
import com.ruoyi.repairSign.mapper.HouseRepairSignTMapper;
import com.ruoyi.repairSign.service.IHouseRepairSignTService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 户资金修改Service业务层处理
 * 
 * @author tyq
 * @date 2023-05-24
 */
@Service
public class HouseRepairSignTServiceImpl implements IHouseRepairSignTService
{
    @Autowired
    private HouseRepairSignTMapper houseRepairSignTMapper;


    /**
     * 查询户资金修改列表
     * 
     * @param houseRepairSignT 户资金修改
     * @return 户资金修改
     */
    @Override
    public List<HouseRepairSignT> selectHouseRepairSignTList(HouseRepairSignT houseRepairSignT)
    {
        return houseRepairSignTMapper.selectHouseRepairSignTList(houseRepairSignT);
    }

    @Transactional
    @Override
    public int updateHouseRepairSignT(String projectId,String[] houseIds,String signSts)
    {
        int i = 0;
        for(String houseId:houseIds){
            HouseRepairSignT houseRepairSignT = new HouseRepairSignT();
            houseRepairSignT.setHouseId(houseId);
            houseRepairSignT.setProjectId(projectId);
            houseRepairSignT.setSignSts(signSts);
            i = houseRepairSignTMapper.updateHouseRepairSignT(houseRepairSignT);
        }
        return i;
    }

}
